import { routes } from '@/router'
export function routeMapTool() {
    let routeMap = {}
    // 递归函数
    function loop(arr){
        arr.forEach(item => {
            routeMap[item.path] = item.meta.lable
            if(item.children){
                loop(item.children)
            }
        })
    }
    loop(routes)
    return routeMap
}